{extend name="admin/layout" /}
{block name="main"}
<div class="row">
    <div class="col-md-12">
        {if condition="ZID neq 1"}
        <div class="panel">
            <div class="panel-heading">余额提现</div>
            <div class="panel-body">
                <div class="widget-body">
                    <div class="alert alert-info">
                        <i class="fa fa-volume-up"></i>
                        {if condition="$userInfo.pay_account eq null"}
                        请先绑定收款支付宝账号！ <a href="{:url('panel/profile')}" class="btn-xs btn-warning btn-sm">点此设置</a>
                        {else}
                        已绑定支付宝账号信息：账号：{$userInfo.pay_account} 姓名：{$userInfo.pay_name} <a href="{:url('panel/profile')}"
                                                                                         class="btn-xs btn-warning btn-sm">修改绑定</a>
                        {/if}
                    </div>
                    <div class="alert alert-warning">
                        <i class="fa fa-volume-up"></i>
                        单笔提现金额不能低于{:config('zz_tixian_min')}元。提现手续费{$tixian_fee}%。
                    </div>
                    <form method="post" class="form-horizontal">
                        <input type="hidden" name="action" value="tixian">
                        <div class="form-group">
                            <label class="col-sm-3 control-label">账户余额</label>
                            <div class="col-sm-9">
                                <input type="text" class="form-control" value="{$userInfo.point}元" disabled>
                            </div>
                        </div>

                        <div class="form-group">
                            <label class="col-sm-3 control-label">提现金额</label>
                            <div class="col-sm-9">
                                <input type="number" name="money" class="form-control" placeholder="输入要提现金额">
                            </div>
                        </div>

                        <div class="form-group">
                            <div class="col-sm-offset-3 col-sm-9">
                                <button class="btn btn-primary" type="submit">确认提现</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
            {/if}
            <div class="panel">
                <div class="panel-heading">提现记录{if condition="ZID eq 1"}-<a href="{:url('txxz')}"
                                                                            class="btn-xs btn-warning">导出待处理记录</a>{/if}
                </div>
                {if condition="ZID eq 1"}
                <div class="panel-body">
                    <form method="get">
                        <input type="hidden" name="action" value="search">
                        <div class="input-group xs-mb-15">
                            <input type="text" placeholder="请输入要搜索的支付宝账号或者姓名！" name="value"
                                   class="form-control text-center"
                                   required>
                        <span class="input-group-btn">
                        <button type="submit" class="btn btn-primary">立即搜索</button>
                        </span>
                        </div>
                    </form>
                </div>
                {/if}
                <div class="panel-body table-responsive">
                    <table class="table table-hover table-striped">
                        <thead>
                        <tr>
                            <th>ID</th>
                            <th>UID</th>
                            <th>金额</th>
                            <th>实际到账</th>
                            <th>提现账号</th>
                            <th>姓名</th>
                            <th>申请时间</th>
                            <th>完成时间</th>
                            <th>状态</th>
                            {if condition="ZID eq 1"}
                            <th>操作</th>
                            {/if}
                        </tr>
                        </thead>
                        <tbody>
                        {volist name="$List" id="row"}
                        <tr>
                            <td><b>{$row.id}</b></td>
                            <td>{$row.uid}</td>
                            <td>{$row.money}元</td>
                            <td>{$row.realmoney}元</td>
                            <td>{$row.pay_account}</td>
                            <td>{$row.pay_name}</td>
                            <td>{$row.addtime}</td>
                            <td>{$row.endtime}</td>
                            <td>{if condition="$row.status eq 1"}<font color="green">已完成</font>{else}<font
                                    color="blue">未完成</font>{/if}
                            </td>
                            {if condition="ZID eq 1"}
                            <td>
                                {if condition="$row.status eq 0"}<a href="?action=complete&id={$row.id}"
                                                                    class="btn-xs btn-success">完成</a>{else}<a
                                    href="?action=reset&id={$row.id}" class="btn-xs btn-info">撤销</a>{/if}
                                <a href="?action=del&id={$row.id}" class="btn-xs btn-danger"
                                   onclick="return confirm('确认删除？');">删除</a>
                            </td>
                            {/if}
                        </tr>
                        {/volist}
                        </tbody>
                    </table>
                    <div class="text-center">{$pageList->showPage()}</div>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}